#include "Pod.h"

#include <string.h>
#include <fan-llvm/core/Core.h>
#include "Type.h"
#include "UnsupportedErr.h"


Type* Pod_classType = NULL;
VTable* Pod_classVTable = NULL;


/**********************************************
 *
 * Methods and fields
 *
 **********************************************/


/* Str toStr() */
Str* Pod_toStr(Obj self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Pod.toStr not implemented yet"));
}


/* Pod? of(Obj obj) */
Pod* Pod_of(Obj obj)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Pod.of not implemented yet"));
}


/* Pod[] list() */
List* Pod_list(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Pod.list not implemented yet"));
}


/* Pod? find(Str name, Bool checked) */
Pod* Pod_find_1(Str* name)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Pod.find not implemented yet"));
}


/* Pod? find(Str name, Bool checked) */
Pod* Pod_find(Str* name, Bool checked)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Pod.find not implemented yet"));
}


/* Pod load(InStream in) */
Pod* Pod_load(InStream* in)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Pod.load not implemented yet"));
}


/* Str name() */
Str* Pod_name(Pod* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Pod.name not implemented yet"));
}


/* Version version() */
Version* Pod_version(Pod* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Pod.version not implemented yet"));
}


/* Depend[] depends() */
List* Pod_depends(Pod* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Pod.depends not implemented yet"));
}


/* Uri uri() */
Uri* Pod_uri(Pod* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Pod.uri not implemented yet"));
}


/* [Str:Str] meta() */
Map* Pod_meta(Pod* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Pod.meta not implemented yet"));
}


/* Type[] types() */
List* Pod_types(Pod* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Pod.types not implemented yet"));
}


/* Type? type(Str name, Bool checked) */
Type* Pod_type_1(Pod* self, Str* name)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Pod.type not implemented yet"));
}


/* Type? type(Str name, Bool checked) */
Type* Pod_type(Pod* self, Str* name, Bool checked)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Pod.type not implemented yet"));
}


/* File[] files() */
List* Pod_files(Pod* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Pod.files not implemented yet"));
}


/* File? file(Uri uri, Bool checked) */
File* Pod_file_1(Pod* self, Uri* uri)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Pod.file not implemented yet"));
}


/* File? file(Uri uri, Bool checked) */
File* Pod_file(Pod* self, Uri* uri, Bool checked)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Pod.file not implemented yet"));
}


/* Str? doc() */
Str* Pod_doc(Pod* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Pod.doc not implemented yet"));
}


/* Log log() */
Log* Pod_log(Pod* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Pod.log not implemented yet"));
}


/* [Str:Str] props(Uri uri, Duration maxAge) */
Map* Pod_props(Pod* self, Uri* uri, Duration* maxAge)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Pod.props not implemented yet"));
}


/* Str? config(Str name, Str? def) */
Str* Pod_config_1(Pod* self, Str* name)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Pod.config not implemented yet"));
}


/* Str? config(Str name, Str? def) */
Str* Pod_config(Pod* self, Str* name, Str* def)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Pod.config not implemented yet"));
}


/* Str? locale(Str name, Str? def) */
Str* Pod_locale_1(Pod* self, Str* name)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Pod.locale not implemented yet"));
}


/* Str? locale(Str name, Str? def) */
Str* Pod_locale(Pod* self, Str* name, Str* def)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Pod.locale not implemented yet"));
}


/**********************************************
 *
 * Type-system functions
 *
 **********************************************/


Type* Pod_initType(void)
{
  if (Pod_classType == NULL)
  {
    Type* baseType = Obj_initType();
    VTable* vtable = Pod_initVTable();
    Type* type = Type_new("Pod", baseType, vtable, sizeof(Pod), sizeof(PodVTable));
    Type_registerMethodImplementation(type, "config", Pod_config_1, 1);
    Type_registerMethodImplementation(type, "config", Pod_config, 2);
    Type_registerMethodImplementation(type, "depends", Pod_depends, 0);
    Type_registerMethodImplementation(type, "doc", Pod_doc, 0);
    Type_registerMethodImplementation(type, "file", Pod_file_1, 1);
    Type_registerMethodImplementation(type, "file", Pod_file, 2);
    Type_registerMethodImplementation(type, "files", Pod_files, 0);
    Type_registerMethodImplementation(type, "find", Pod_find_1, 1);
    Type_registerMethodImplementation(type, "find", Pod_find, 2);
    Type_registerMethodImplementation(type, "list", Pod_list, 0);
    Type_registerMethodImplementation(type, "load", Pod_load, 1);
    Type_registerMethodImplementation(type, "locale", Pod_locale_1, 1);
    Type_registerMethodImplementation(type, "locale", Pod_locale, 2);
    Type_registerMethodImplementation(type, "log", Pod_log, 0);
    Type_registerMethodImplementation(type, "meta", Pod_meta, 0);
    Type_registerMethodImplementation(type, "name", Pod_name, 0);
    Type_registerMethodImplementation(type, "of", Pod_of, 1);
    Type_registerMethodImplementation(type, "props", Pod_props, 2);
    Type_registerMethodImplementation(type, "toStr", Pod_toStr, 0);
    Type_registerMethodImplementation(type, "type", Pod_type_1, 1);
    Type_registerMethodImplementation(type, "type", Pod_type, 2);
    Type_registerMethodImplementation(type, "types", Pod_types, 0);
    Type_registerMethodImplementation(type, "uri", Pod_uri, 0);
    Type_registerMethodImplementation(type, "version", Pod_version, 0);
    Pod_classType = type;
    Pod_initStatic();
  }
  return Pod_classType;
}


VTable* Pod_initVTable(void)
{
  if (Pod_classVTable == NULL)
  {
    VTable* vtable = memoryAlloc(sizeof(PodVTable));
    memcpy(vtable, Obj_initVTable(), sizeof(FanObjVTable));
    ((FanObjVTable*)vtable)->toStr = Pod_toStr;
    Pod_classVTable = vtable;
  }
  return Pod_classVTable;
}


void Pod_initStatic(void)
{
}
